<?php 
function delete_module($id_module)
{	

	
	global $Sql;
	
	$videoUrl = $Sql->query("SELECT videoUrl FROM phpboost_plugin_uploadvideo WHERE id = ".$id_module,__LINE__,__FILE__);
	$langFr = $Sql->query("SELECT langFr FROM phpboost_plugin_uploadvideo WHERE id = ".$id_module,__LINE__,__FILE__);
	$langEn = $Sql->query("SELECT langEn FROM phpboost_plugin_uploadvideo WHERE id = ".$id_module,__LINE__,__FILE__);
	$langNl = $Sql->query("SELECT langNl FROM phpboost_plugin_uploadvideo WHERE id = ".$id_module,__LINE__,__FILE__);
	
	unlink('../../course/plugin/video_viewer/content/'.$videoUrl.'.flv');
	
	if($langFr == 1){unlink('../../course/plugin/video_viewer/content/'.$videoUrl.'_fr.srt');}
	if($langEn == 1){unlink('../../course/plugin/video_viewer/content/'.$videoUrl.'_en.srt');}
	if($langNl == 1){unlink('../../course/plugin/video_viewer/content/'.$videoUrl.'_nl.srt');}
	
	$Sql->query_inject("DELETE FROM phpboost_plugin_uploadvideo WHERE id = ".$id_module, __LINE__,__FILE__);
	return true;
	
	
}

?>